const { serverMap: chdstoreMap } = require("./chdstore");
const { serverMap: chdtuanMap } = require("./chdtuan");
const { ChdGradeOrder } = require("./ChdGradeOrder");

const serverMap = {
  // 页面商城
  ...chdstoreMap,
  // 统一团购
  ...chdtuanMap,
  // 等级补完
  "/project/ChdGrade/order.asp": ChdGradeOrder,
  "/project/ChdGrade/login.asp": ({ proxyRes, res, response }) => {
    res.status(200);
    res.setHeader("Content-Type", "application/json");

    return JSON.stringify({
      success: !response.includes("请先登录"),
    });
  },
};

module.exports = {
  serverMap,
};
